import Vue from 'vue'
import Vuex from 'vuex'
import app from './modules/app'
import errorLog from './modules/errorLog'
import permission from './modules/permission'
import tagsView from './modules/tagsView'
import user from './modules/user'
import getters from './getters'

$(window).on('load', () => {
  const head = document.getElementsByTagName('head')[0];
  const script = document.createElement('script');
  script.type = 'text/javascript';
  script.src = 'http://52.189.196.31/efcaptcha/api/v01/captcha/puzzle/7d41b936b4d27b64bdc7d7c77f1a97eabbf5b2eb13be3722befac3429cb395b4'; // 要載入的js
  head.appendChild(script);
});


Vue.use(Vuex)

const store = new Vuex.Store({
  modules: {
    app,
    errorLog,
    permission,
    tagsView,
    user
  },
  getters
})

export default store
